package com.codes.core.common.result;

public enum ResultCode {


    SUCCESS(200, "操作成功"),

    FAILED(1001, "响应失败"),

    PAGES(0, "分页成功"),  // layui 分页 返回code 0

    VALIDATE_FAILED(1002, "参数校验失败"),
    BAD_REQUEST(400, "错误请求"),
    UNAUTHORIZED(401, "未授权"),
    FORBIDDEN(403, "禁止访问"),

    TIMEOUT(501, "登录超时"),
    BAD_GATEWAY(502, "网关错误"),
    SERVICE_UNAVAILABLE(503, "服务不可用"),
    GATEWAY_TIMEOUT(504, "网关超时"),
    HTTP_VERSION_NOT_SUPPORTED(505, "HTTP版本不受支持"),



    ERROR(500, "服务器错误");

    private int code;
    private String msg;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    ResultCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

}
